﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Deferred.Library.Scene.Graphics
{
    struct TerrainVertex
    {
        public Vector3 Position;
        public Vector3 Normal;
        public Vector2 TextureCoordinates;
        public Vector4 TextureWeights;
        public Vector3 Tangent;
        public Vector3 Binormal;

        public static int SizeInBytes = sizeof(float) * 18;

        public static VertexElement[] VertexElements = new VertexElement[]
            {
                new VertexElement(0,0,VertexElementFormat.Vector3,VertexElementMethod.Default,
                    VertexElementUsage.Position,0),
                new VertexElement(0,sizeof(float) * 3,VertexElementFormat.Vector3,VertexElementMethod.Default,
                    VertexElementUsage.Normal,0),
                new VertexElement(0,sizeof(float) * 6,VertexElementFormat.Vector4,VertexElementMethod.Default,
                    VertexElementUsage.TextureCoordinate,0),
                new VertexElement(0,sizeof(float) * 8,VertexElementFormat.Vector4,VertexElementMethod.Default,
                    VertexElementUsage.TextureCoordinate,1),
                new VertexElement(0,sizeof(float) * 12, VertexElementFormat.Vector3, VertexElementMethod.Default,
                    VertexElementUsage.Tangent,0),
                new VertexElement(0,sizeof(float) * 15, VertexElementFormat.Vector3, VertexElementMethod.Default,
                    VertexElementUsage.Binormal,0),
            };
    }
}
